package com.hello.games;

import java.util.ArrayList;
import java.util.Random;


import android.app.Activity;

public class GameFactoryBuilder {
	@SuppressWarnings("rawtypes")
	private ArrayList<Class> games;
	Random random;
	private static GameFactoryBuilder instance;
	
	public static GameFactoryBuilder getInstance(){
		if (instance == null){
			instance = new GameFactoryBuilder();
		}
		return instance;
	}
	
	@SuppressWarnings("rawtypes")
	private GameFactoryBuilder(){
		random = new Random();
		games = new ArrayList<Class>();
		games.add(FindTheBeerGame.class);
		games.add(PressTheButtonGame.class);
	}
	
	public Class getRandomGame(){
		int num = random.nextInt(2);
		return games.get(num);
	}

}
